<template>
  <div>
    <div id="box"></div>
    <vertical-menu></vertical-menu>
    <div class="tabbar">
      <div class="page-header">
        <i class="el-icon-setting iconfont"></i>
        <span>Setting</span>
      </div>
    </div>
    <div id="base">
      <div class="form">
        <el-form>
          <el-form-item label="Abnormal data waiting time">
            <el-input v-model="setInfo.waitTime" type="number" :min="0"></el-input>
            <span class="unit">Minutes</span>
          </el-form-item>
          <el-form-item label="Scheduling reminder">
            <el-input v-model="setInfo.reminder" type="number" :min="0"></el-input>
            <span class="unit">Days</span>
          </el-form-item>
          <el-form-item label="Color theme">
            <el-select v-model="setInfo.theme">
              <el-option label="normal" value="normal"></el-option>
              <el-option label="other" value="other"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="WIFI Mac">
            <el-button class="button" @click="goTo('/wifi')">To Set</el-button>
          </el-form-item>
          <el-form-item label="Location Setting">
            <el-button class="button" @click="goTo('/location')">To Set</el-button>
            <el-switch class="unit" v-model="setInfo.location" active-color="#ABC270" inactive-color="#8C8C8C"></el-switch>
          </el-form-item>
          <el-form-item label="Leave Setting">
            <el-button class="button" @click="goTo('/leave')">To Set</el-button>
          </el-form-item>
          <el-form-item label="Public Holiday Setting">
            <el-button class="button" @click="goTo('/holiday')">To Set</el-button>
          </el-form-item>
        </el-form>
        <div class="button-group">
          <el-button type="primary" class="save">Save</el-button>
          <el-button class="save">Reset</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import VerticalMenu from '@/components/VerticalMenu.vue'
export default {
  components: {
    VerticalMenu,
  },
  data(){
    return {
      setInfo: {
        waitTime: 0,
        reminder: 0,
        theme: 'normal',
        location: false,
      }
    }
  },
  created(){

  },
  mounted(){

  },
  methods: {
    goTo(path) {
      this.$router.push('/setting'+path);
    },
  }
}
</script>

<style lang="less" scoped>
  #box {
    height: 100%;
    width: 100%;
    position: fixed;
    background-color: #F2F2F2;
    z-index: -1;
  }

  #base {
    padding: 100px 0 0 250px;
  }

  .content {
    padding-bottom: 20px;
    // width: 1260px;
    background-color: #F2F2F2;
    float: left;
  }

  .tabbar {
    margin: 0 0 0 250px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #F2F2F2;
    z-index: 100;
    position: fixed;
  }

  .page-header {
    width: 1234px;
    height: 64px;
    background-color: rgba(242,235,211,0.3);
    border: 2px solid rgba(150, 169, 97,0.5);
    border-radius: 5px;
    margin: 0 20px 0 15px;
    line-height: 64px;
    span {
      color: #473C33;
      margin-left: 10px;
      font-size: 30px;
      // font-weight: 600;
    }
    .el-icon-setting{
      margin-left: 20px;
      font-size: 35px;
      color: #ABC270;
      // vertical-align: middle;
    }
  }

  .form {
    // width: 750px;
    margin: 50px 150px;
  }

  .unit {
    font-size: 20px;
    margin-left: 10px;
    color: #697644;
  }

  /deep/ .el-form-item {
    margin-bottom: 40px;
  }

  /deep/ .el-form-item__label {
    width: 300px;
    text-align: right;
    font-size: 20px;
    color: #697644;
  }

  /deep/ .el-input {
    width: 400px;
  }

  /deep/ .el-input__inner {
    text-align: center;
    background: rgba(242, 235, 211, 0.3);
    font-size: 18px;
    border: 2px solid #96A961;
  }

  /deep/ .el-select {
    width: 400px;
  }

  .button {
    width: 400px;
    font-size: 18px;
    color: #96A961;
    background-color: rgba(150, 169, 97,0.2);
  }

  /deep/ input::-webkit-outer-spin-button,
  /deep/ input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
  }

  /deep/ input[type="number"]{
    -moz-appearance: textfield;
  }

  .button-group {
    margin-left: 300px;
  }

  .save {
    width: 190px;
    font-size: 18px;
    margin-right: 10px;
  }
</style>
